package cn.yitun.chat.yitunserverimapicore.business.group.service;

import cn.yitun.chat.yituncommonmessage.Info;
import cn.yitun.chat.yitunservercommonlib.crud.yitun.CrudService;
import cn.yitun.chat.yitunservercommonlib.dataentity.dto.group.GroupMemberDto;
import cn.yitun.chat.yitunservercommonlib.dataentity.po.group.GroupMemberInfo;
import cn.yitun.chat.yitunservercommonlib.dataentity.vo.group.GroupMemberVo;

import java.util.List;

/**
 * 
 * Date 2019-01-21 12:46:31<br>
 * Description
 * 
 * @author yitun
 * @since 1.0.0
 */
public interface GroupMemberService
		extends CrudService<GroupMemberDto, GroupMemberInfo, GroupMemberVo>{


	/**
	 * 获取用户在各个群中的权限
	 * @author yitun
	 * @param userId
	 * @return
	 */
	List<GroupMemberVo> getGroupMemberListOfUserInGroupByUserId(Long userId);

	List<GroupMemberVo> getGroupMemberListByGroupId(Long groupId);

	GroupMemberVo getGroupMemberById(Long id) ;

	GroupMemberVo getGroupMemberByGroupIdUserId(Long groupId, Long userId);

	/**
	 * Date 2019-01-23 22:15:19<br>
	 * Description 修改群成员备注名
	 * @author yitun
	 * @param handleUserId
	 * @param groupId
	 * @param userId
	 * @param remark
	 * @return
	 * @since 1.0.0
	 */
	Info updateRemark(Long handleUserId, Long groupId, Long userId, String remark);

	/**
	 * Date 2019-01-23 22:13:27<br>
	 * Description 设置用户权限
	 * @author yitun
	 * @param handleUserId
	 * @param groupId
	 * @param userId
	 * @param position
	 * @return
	 * @since 1.0.0
	 */
	Info updatePosition(Long handleUserId, Long groupId, Long userId, String position);

	/**
	 * Date 2019-01-23 22:12:12<br>
	 * Description 删除群成员
	 * @author yitun
	 * @param handleUserId
	 * @param groupId
	 * @param userId
	 * @return
	 * @since 1.0.0
	 */
	Info delete(Long handleUserId, Long groupId, Long userId);

	/**
	 * Date 2019-01-27 11:08:11<br>
	 * Description 退出
	 * @author yitun
	 * @param groupId
	 * @param userId
	 * @return
	 * @since 1.0.0
	 */
	Info quit(Long groupId, Long userId);
}
